<extend name="Public:baseAjax" />
<block name="content">
<Widget:show bdcls="no-padding" title="对象管理" col="6">
    <Widget:action id="modelObj-header" title="">
        <a class="btn btn-primary" ajax-dialog href="{:U('Admin/addModel')}" >新增</a>
        <a grid-edit ajax-dialog class="btn btn-info disabled" href="{:U('Admin/editModel')}" >修改</a>
        <a grid-delete data-ajax class="btn btn-danger disabled" href="{:U('Admin/deleteModel')}" >删除</a>
    </Widget:action>
    <div class="alert alert-info no-margin fade in">
        <i class="fa-fw fa fa-info"></i>
        请添加ApiCloud的所有对象模型。
    </div>
    <div class="table-responsive">
        <table id="modelObj" class="table table-bordered">
            <thead>
                <th w_index="id">id</th>
                <th w_index="name">对象名称</th>
                <th w_index="title">标题</th>
            </thead>
        </table>
    </div>
    <div id="modelObj-footer" class="widget-footer">
          
    </div>
</Widget:show>



<Widget:show bdcls="no-padding" title="用户管理" col="6">
    <Widget:action id="userObj-header" title="">
        <a class="btn btn-primary" ajax-dialog href="{:U('Admin/addUser')}" >新增</a>
        <a grid-edit ajax-dialog class="btn btn-info disabled" href="{:U('Admin/editUser')}" >修改</a>
        <a grid-delete data-ajax class="btn btn-danger disabled" href="{:U('Admin/deleteUser')}" >删除</a>
    </Widget:action>
    <div class="alert alert-info no-margin fade in">
        AcAdmin后台登陆用户管理。     
    </div>
    <div class="table-responsive">
        <table id="userObj" class="table table-bordered">
            <thead>
                <th w_index="id">id</th>
                <th w_index="account">登陆名</th>
                <th w_index="password">登陆密码</th>
            </thead>
        </table>
    </div>
    <div id="userObj-footer" class="widget-footer">
          
    </div>
</Widget:show>


<load href="assets/js/bsgrid/css/bsgrid.all.css" />
<script type="text/javascript">
pageSetUp();
var modelObj;
var userObj;
var pagefunction = function() {
    loadScript("assets/js/bsgrid/bsgrid.all.js", run);
    function run(){
        modelObj = $.fn.bsgrid.init('modelObj', {
            url: '{:U('Admin/getAllModels')}',
            pageSizeSelect: false,
            // pageAll:true,
            // displayBlankRows:false,
            // pagingLittleToolbar: true,
            pageSize: 6
        });

        userObj = $.fn.bsgrid.init('userObj', {
            url: '{:U('Admin/getAllUsers')}',
            pageSizeSelect: false,
            // pageAll:true,
            // displayBlankRows:false,
            // pagingLittleToolbar: true,
            pageSize: 6
        });

    }
}
pagefunction();

</script>
</block>
